package com.ikun.mybatisstudy.mapper;

import com.ikun.mybatisstudy.dto.User;
import org.apache.ibatis.annotations.*;

/**
 * @Classname UserDao
 * @Description TODO
 * @Date 2025/3/20 9:59
 * @Created by Song zuo gang
 */
@Mapper
public interface UserDao {
    @Results(id="userResultMap",value = {
            @Result(property = "id",column = "id",id = true),
            @Result(property = "age",column = "age"),
            @Result(property = "name",column = "name")
    })
    @Select("select id,name,age from user where id = #{id}")
    User queryById(int id);


    boolean insertUser(User user);


    int updateUser(User user);




}
